package br.com.ged.infraestrutura;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class PersistenceContextListener implements 
	ServletContextListener{

	@Override
	public void contextInitialized(ServletContextEvent evt) {
	}
	
	/**
	 * Libera recursos quando a aplicação é finalizada
	 */
	@Override
	public void contextDestroyed(ServletContextEvent evt) {
		PersistenceContextSingleton.getInstance().fechaEntityManagerFactory();
	}
}
